/* 语音设置面板样式 */
.voice-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.voice-settings-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    animation: voiceSettingsSlideIn 0.3s ease-out;
}

@keyframes voiceSettingsSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.voice-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.voice-settings-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.voice-settings-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.voice-settings-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.voice-settings-content {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.voice-settings-section {
    margin-bottom: 32px;
}

.voice-settings-section h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.current-voice {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #3b82f6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.current-voice .voice-description {
    font-size: 14px;
    color: #6b7280;
}

.voice-category {
    margin-bottom: 24px;
}

.voice-category h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    padding-left: 8px;
    border-left: 3px solid #3b82f6;
}

.voice-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.voice-character-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.voice-character-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.voice-character-card.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.voice-character-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.voice-character-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.voice-character-params {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.voice-character-params span {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.voice-test-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.voice-test-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.voice-settings-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.voice-settings-save {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-settings-save:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 深色模式支持 */
.dark .voice-settings-panel {
    background: #1f2937;
    color: #e5e7eb;
}

.dark .voice-settings-content {
    color: #e5e7eb;
}

.dark .voice-settings-section h4 {
    color: #e5e7eb;
}

.dark .voice-category h5 {
    color: #d1d5db;
}

.dark .current-voice {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #60a5fa;
}

.dark .voice-character-card {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .voice-character-card:hover {
    border-color: #60a5fa;
    background: #4b5563;
}

.dark .voice-character-card.selected {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #60a5fa;
}

.dark .voice-character-name {
    color: #f9fafb;
}

.dark .voice-character-description {
    color: #d1d5db;
}

.dark .voice-character-params span {
    background: #4b5563;
    color: #9ca3af;
}

.dark .voice-settings-footer {
    border-top-color: #4b5563;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .voice-settings-panel {
        width: 95%;
        margin: 20px;
    }

    .voice-characters-grid {
        grid-template-columns: 1fr;
    }

    .voice-settings-content {
        padding: 16px;
    }
}